package com.wjh.api.service;

import com.wjh.bean.Result;
import com.wjh.pojo.PaymentInfo;
import org.springframework.web.bind.annotation.*;

import java.io.UnsupportedEncodingException;

/**
 * @Author: 王金海
 * @Description:
 * @Date: Created by Administrator on 2018/6/22.
 * @Modified By:
 */

@RequestMapping("pay")
public interface PayService {

    /**
     *  创建支付订单并返回token
     * @param paymentInfo
     * @return
     */
    @PostMapping("createPayToken")
    Result createPayToken(@RequestBody PaymentInfo paymentInfo);

    /**
     * 通过token查询支付信息
     * @param payToken
     * @return
     */
    @GetMapping("findPayToken")
    Result findPayToken(@RequestParam("payToken") String payToken) throws UnsupportedEncodingException;
}
